#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include"win_qextserialport.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

    Win_QextSerialPort *myPort;

    void OpenPort(const QString & name, const PortSettings& settings, QextSerialBase::QueryMode mode);
    void ClosePort();
    QByteArray ReadPort();
    void WritePort(const QByteArray & name);

public:
    explicit MainWindow(QWidget *parent = 0);

    ~MainWindow();

private slots:
    void on_SendMsgBtn_clicked();

    void on_ReadMsgBtn_clicked();

    void on_OpenPortBtn_clicked();

    void on_ResetTextBtn_clicked();

    void on_ClosePortBtn_clicked();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
